package com.wangshouyu.mp.media;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
import com.wangshouyu.mp.base.response.BaseResponse;

import java.io.Serializable;
import java.util.Objects;

/**
 * @author 王守钰
 * @date 2020年12月22日 16:04
 * @description 素材信息
 */
public class MediaItem implements Serializable {

    /**
     * 素材id
     */
    @SerializedName(value = "media_id")
    @JsonProperty(value = "media_id")
    @JSONField(name = "media_id")
    private String mediaId;

    /**
     * 素材id
     */
    private String name;

    /**
     * 素材id
     */
    @SerializedName(value = "update_time")
    @JsonProperty(value = "update_time")
    @JSONField(name = "update_time")
    private String updateTime;

    /**
     * 地址
     */
    private String url;

    public String getMediaId() {
        return mediaId;
    }

    public void setMediaId(String mediaId) {
        this.mediaId = mediaId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        MediaItem mediaItem = (MediaItem) o;
        return Objects.equals(mediaId, mediaItem.mediaId) && Objects.equals(name, mediaItem.name) && Objects.equals(updateTime, mediaItem.updateTime) && Objects.equals(url, mediaItem.url);
    }

    @Override
    public int hashCode() {
        return Objects.hash(mediaId, name, updateTime, url);
    }

    @Override
    public String toString() {
        return "MediaItem{" +
                "mediaId='" + mediaId + '\'' +
                ", name='" + name + '\'' +
                ", updateTime='" + updateTime + '\'' +
                ", url='" + url + '\'' +
                '}';
    }
}
